package com.haoshuang.zhouzhoubang.ui.page.settled.collaborationcosts

import com.haoshuang.zhouzhoubang.databinding.ItemCollaborationCostsBinding
import com.haoshuang.zhouzhoubang.model.bean.StoreYearMoneyBean
import com.mufeng.libs.base.BaseBindingHolder
import com.mufeng.libs.base.BaseBindingQuickAdapter
import com.mufeng.libs.utils.view.visibleOrGone

/**
 *
 */
class CollaborationCostsAdapter(data: MutableList<StoreYearMoneyBean.Welfare>) :
    BaseBindingQuickAdapter<StoreYearMoneyBean.Welfare, ItemCollaborationCostsBinding>(data) {

    override fun onBindViewHolder(holder: BaseBindingHolder, position: Int, item: StoreYearMoneyBean.Welfare?) {
        holder.getViewBinding<ItemCollaborationCostsBinding>().apply {

            viewLine.visibleOrGone(position != items.size - 1)
            tvTitle.text = item?.welfare_name
            tvContent.text = item?.number

        }
    }
}
